3.187 \(\int (a+b \sec (c+d x))^3 \sin (c+d x) \, dx\)

Optimal. Leaf size=64 \[ -\frac {a^3 \cos (c+d x)}{d}-\frac {3 a^2 b \log (\cos (c+d x))}{d}+\frac {3 a b^2 \sec (c+d x)}{d}+\frac {b^3 \sec ^2(c+d x)}{2 d} \]

[Out]

-a^3*cos(d*x+c)/d-3*a^2*b*ln(cos(d*x+c))/d+3*a*b^2*sec(d*x+c)/d+1/2*b^3*sec(d*x+c)^2/d

________________________________________________________________________________________

Rubi [A]  time = 0.10, antiderivative size = 64, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.210, Rules used = {3872, 2833, 12, 43} \[ -\frac {3 a^2 b \log (\cos (c+d x))}{d}-\frac {a^3 \cos (c+d x)}{d}+\frac {3 a b^2 \sec (c+d x)}{d}+\frac {b^3 \sec ^2(c+d x)}{2 d} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Sec[c + d*x])^3*Sin[c + d*x],x]

[Out]

-((a^3*Cos[c + d*x])/d) - (3*a^2*b*Log[Cos[c + d*x]])/d + (3*a*b^2*Sec[c + d*x])/d + (b^3*Sec[c + d*x]^2)/(2*d
)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2833

Int[cos[(e_.) + (f_.)*(x_)]*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)
])^(n_.), x_Symbol] :> Dist[1/(b*f), Subst[Int[(a + x)^m*(c + (d*x)/b)^n, x], x, b*Sin[e + f*x]], x] /; FreeQ[
{a, b, c, d, e, f, m, n}, x]

Rule 3872

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.), x_Symbol] :> Int[((g*C
os[e + f*x])^p*(b + a*Sin[e + f*x])^m)/Sin[e + f*x]^m, x] /; FreeQ[{a, b, e, f, g, p}, x] && IntegerQ[m]

Rubi steps

\begin {align*} \int (a+b \sec (c+d x))^3 \sin (c+d x) \, dx &=-\int (-b-a \cos (c+d x))^3 \sec ^2(c+d x) \tan (c+d x) \, dx\\ &=\frac {\operatorname {Subst}\left (\int \frac {a^3 (-b+x)^3}{x^3} \, dx,x,-a \cos (c+d x)\right )}{a d}\\ &=\frac {a^2 \operatorname {Subst}\left (\int \frac {(-b+x)^3}{x^3} \, dx,x,-a \cos (c+d x)\right )}{d}\\ &=\frac {a^2 \operatorname {Subst}\left (\int \left (1-\frac {b^3}{x^3}+\frac {3 b^2}{x^2}-\frac {3 b}{x}\right ) \, dx,x,-a \cos (c+d x)\right )}{d}\\ &=-\frac {a^3 \cos (c+d x)}{d}-\frac {3 a^2 b \log (\cos (c+d x))}{d}+\frac {3 a b^2 \sec (c+d x)}{d}+\frac {b^3 \sec ^2(c+d x)}{2 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.12, size = 56, normalized size = 0.88 \[ \frac {b \left (-6 a^2 \log (\cos (c+d x))+6 a b \sec (c+d x)+b^2 \sec ^2(c+d x)\right )-2 a^3 \cos (c+d x)}{2 d} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Sec[c + d*x])^3*Sin[c + d*x],x]

[Out]

(-2*a^3*Cos[c + d*x] + b*(-6*a^2*Log[Cos[c + d*x]] + 6*a*b*Sec[c + d*x] + b^2*Sec[c + d*x]^2))/(2*d)

________________________________________________________________________________________

fricas [A]  time = 0.54, size = 67, normalized size = 1.05 \[ -\frac {2 \, a^{3} \cos \left (d x + c\right )^{3} + 6 \, a^{2} b \cos \left (d x + c\right )^{2} \log \left (-\cos \left (d x + c\right )\right ) - 6 \, a b^{2} \cos \left (d x + c\right ) - b^{3}}{2 \, d \cos \left (d x + c\right )^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(d*x+c))^3*sin(d*x+c),x, algorithm="fricas")

[Out]

-1/2*(2*a^3*cos(d*x + c)^3 + 6*a^2*b*cos(d*x + c)^2*log(-cos(d*x + c)) - 6*a*b^2*cos(d*x + c) - b^3)/(d*cos(d*
x + c)^2)

________________________________________________________________________________________

giac [A]  time = 1.56, size = 66, normalized size = 1.03 \[ -\frac {a^{3} \cos \left (d x + c\right )}{d} - \frac {3 \, a^{2} b \log \left (\frac {{\left | \cos \left (d x + c\right ) \right |}}{{\left | d \right |}}\right )}{d} + \frac {6 \, a b^{2} \cos \left (d x + c\right ) + b^{3}}{2 \, d \cos \left (d x + c\right )^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(d*x+c))^3*sin(d*x+c),x, algorithm="giac")

[Out]

-a^3*cos(d*x + c)/d - 3*a^2*b*log(abs(cos(d*x + c))/abs(d))/d + 1/2*(6*a*b^2*cos(d*x + c) + b^3)/(d*cos(d*x +
c)^2)

________________________________________________________________________________________

maple [A]  time = 0.19, size = 65, normalized size = 1.02 \[ \frac {b^{3} \left (\sec ^{2}\left (d x +c \right )\right )}{2 d}+\frac {3 a \,b^{2} \sec \left (d x +c \right )}{d}+\frac {3 a^{2} b \ln \left (\sec \left (d x +c \right )\right )}{d}-\frac {a^{3}}{d \sec \left (d x +c \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*sec(d*x+c))^3*sin(d*x+c),x)

[Out]

1/2*b^3*sec(d*x+c)^2/d+3*a*b^2*sec(d*x+c)/d+3/d*a^2*b*ln(sec(d*x+c))-1/d*a^3/sec(d*x+c)

________________________________________________________________________________________

maxima [A]  time = 1.18, size = 57, normalized size = 0.89 \[ -\frac {2 \, a^{3} \cos \left (d x + c\right ) + 6 \, a^{2} b \log \left (\cos \left (d x + c\right )\right ) - \frac {6 \, a b^{2}}{\cos \left (d x + c\right )} - \frac {b^{3}}{\cos \left (d x + c\right )^{2}}}{2 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(d*x+c))^3*sin(d*x+c),x, algorithm="maxima")

[Out]

-1/2*(2*a^3*cos(d*x + c) + 6*a^2*b*log(cos(d*x + c)) - 6*a*b^2/cos(d*x + c) - b^3/cos(d*x + c)^2)/d

________________________________________________________________________________________

mupad [B]  time = 0.93, size = 57, normalized size = 0.89 \[ -\frac {a^3\,\cos \left (c+d\,x\right )-\frac {\frac {b^3}{2}+3\,a\,\cos \left (c+d\,x\right )\,b^2}{{\cos \left (c+d\,x\right )}^2}+3\,a^2\,b\,\ln \left (\cos \left (c+d\,x\right )\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(c + d*x)*(a + b/cos(c + d*x))^3,x)

[Out]

-(a^3*cos(c + d*x) - (b^3/2 + 3*a*b^2*cos(c + d*x))/cos(c + d*x)^2 + 3*a^2*b*log(cos(c + d*x)))/d

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \sec {\left (c + d x \right )}\right )^{3} \sin {\left (c + d x \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(d*x+c))**3*sin(d*x+c),x)

[Out]

Integral((a + b*sec(c + d*x))**3*sin(c + d*x), x)

________________________________________________________________________________________